package com.gopay.common.cps.dao.cbrmb.impl;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.gopay.common.base.dao.impl.BaseDAOImpl;
import com.gopay.common.cps.dao.cbrmb.CbRmbRemitSplitInfoDAO;
import com.gopay.common.domain.cbrmb.remit.CbRmbRemitSplitInfo;

/**
 * 跨境人民币  汇款拆分信息表DAO实现类
 * 
 * @CbRmbRemitSplitInfoDAOImpl.java
 * @author lailingyu
 * @2017-4-18 下午4:17:56 www.gopay.com.cn Inc.All rights reserved.
 */
@Repository("cbRmbRemitSplitInfoDAO")
public class CbRmbRemitSplitInfoDAOImpl extends BaseDAOImpl<CbRmbRemitSplitInfo, Serializable>
		implements CbRmbRemitSplitInfoDAO {

	@Override
	public List<CbRmbRemitSplitInfo> findByBatchTargetId(String batchTargetId) {
		String hql = "from CbRmbRemitSplitInfo where batchTargetId =:batchTargetId";
		Map<String, Object> param = new HashMap<String, Object>();
		param.put("batchTargetId", batchTargetId);
		return findByHql(hql, param);
	}

	@Override
	public List<CbRmbRemitSplitInfo> findByBatchTaskId(String batchTaskId) {
		String hql = "from CbRmbRemitSplitInfo where batchTaskId =:batchTaskId order by batchTargetId";
		Map<String, Object> param = new HashMap<String, Object>();
		param.put("batchTaskId", batchTaskId);
		return findByHql(hql, param);
	}

}
